package cc.messcat.web.system;

import cc.messcat.service.system.SystemService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.PostConstruct;
import javax.servlet.ServletContext;

/**
 * 系统初始化动作类
 */
public class Initialization {

	@Autowired
	private AreaAspect areaAspcet;
	@Autowired
	private SystemService systemService;
	@Autowired
	private ServletContext servletContext;

	@PostConstruct
	public void init() {
		// 区域缓存更新方法
		areaAspcet.updateAreaCacha();


		//业务年度获取
		String annual = systemService.getBusinessAnnual();
		servletContext.setAttribute("businessAnnual", annual);
	}

}
